<template>
    <div class="service_login">
        <br>
        <el-row>
            <el-col :span="12">
                <el-input v-model="name" placeholder="项目名称筛选"></el-input>
            </el-col>
            <el-col :span="12" class="projectButton">
                <el-button icon="el-icon-plus" type="text" @click="onCreat">创建项目</el-button>
                <span style="float:right">&nbsp;&nbsp;</span>
                <el-button icon="el-icon-refresh" type="text" @click="onRefresh">刷新</el-button>
            </el-col>
        </el-row>
        <br>
        <el-row :gutter="15" class="project_List">
            <el-col :xs="12" :sm="8" :md="6" :xl="4" v-for="(item ,index) in list" :key="index">
                <item :project_data="item" :onEdit="onEdit" :onDelete="onDelete"></item>
            </el-col>
        </el-row>
    </div>
</template>
<script>
import item from './projectItem';
export default {
    props: ['onEdit', 'onDelete', 'onRefresh', 'onCreat'],
    components: {
        item
    },
    data() {
        return {
            name: '',
            list: [],
        };
    },
    methods: {
        setData(res) {
            this.list = res;
        },
    },
}
</script>
<style scoped>
    .projectButton .el-button { float: right; }
    .project_List { position: absolute; padding: 10px; top: 70px; bottom: 0px; left: 5px; right: 10px; overflow-x: hidden; overflow-y: auto; }
</style>